bitkeeper revision 1.1099.1.1 (40f7cb1eMTkl14JJIaobtE7X06GRng)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 16 Jul 2004 12:33:34 +0000 (12:33 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 16 Jul 2004 12:33:34 +0000 (12:33 +0000)
Small fixes

linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/vbd.c
xen/arch/x86/domain.c

index 134e94ef26d9f4017b182ea476b1efded99a5ed1..7b423c4fcfc5c46fb2fb66dd7f3f2b5119c1f074 100644 (file)
@@ -126,33 +126,30 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
     x->next                 = (blkif_extent_le_t *)NULL; 
 
     gd = get_gendisk(x->extent.device);
-
-    if (!gd || !gd->part)
+    if ( (gd == NULL) || (gd->part == NULL) )
     {
         grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND; 
         DPRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device);
         goto out;
     }
 
-    hd = &gd->part[MINOR(x->extent.device)];
-
-    if (!hd)
+    if ( (hd = &gd->part[MINOR(x->extent.device)]) == NULL )
     {
         grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND; 
         DPRINTK("vbd_grow: HD device %08x doesn't exist.\n", x->extent.device);
         goto out;
     }
 
-    printk("vbd_grow: requested_len %llu actual_len %lu\n", 
-          x->extent.sector_length,  hd->nr_sects );
+    DPRINTK("vbd_grow: requested_len %llu actual_len %lu\n", 
+            x->extent.sector_length, hd->nr_sects);
 
-    /* this test assumes sector_start is zero, which in the new
-       IO world it always will be -- We need to simpligy the 
-       grow/shrink interface as we'll always be deadling with whole
-       devices
-    */
+    /*
+     * NB. This test assumes sector_start == 0, which is always the case
+     * in Xen 1.3. In fact the whole grow/shrink interface could do with
+     * some simplification.
+     */
     if ( x->extent.sector_length > hd->nr_sects )
-       x->extent.sector_length = hd->nr_sects;    
+        x->extent.sector_length = hd->nr_sects;    
 
     for ( px = &vbd->extents; *px != NULL; px = &(*px)->next ) 
         continue;
index 52eee6113e5ae3ec0e7a34666b0733938101b4c2..55293ed973ef82635a9b654ed93ad2ad8d115072 100644 (file)
@@ -197,9 +197,17 @@ void machine_restart(char * __unused)
     panic("Need to reinclude BIOS reboot code\n");
 }
 
+
+void __attribute__((noreturn)) __machine_halt(void *unused)
+{
+    for ( ; ; )
+        __asm__ __volatile__ ( "cli; hlt" );
+}
+
 void machine_halt(void)
 {
-    while(1){ safe_halt(); }
+    smp_call_function(__machine_halt, NULL, 1, 1);
+    __machine_halt(NULL);
 }
 
 void arch_do_createdomain(struct domain *d)